<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Add Activity</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 20px;
        }

        h2 {
            color: #333;
        }

        form {
            max-width: 600px;
            margin: 20px auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        label {
            display: block;
            margin-bottom: 10px;
        }

        input, textarea {
            width: 100%;
            padding: 10px;
            margin-bottom: 10px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        input[type="submit"] {
            background-color: #4caf50;
            color: #fff;
            cursor: pointer;
        }

        input[type="submit"]:hover {
            background-color: #45a049;
        }

        a {
            display: block;
            margin-top: 10px;
            color: #333;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>

<h2>Add Activity</h2>

<form action="/activities/add-activity" method="post" th:object="${activity}">
    <label>Name: <input type="text" th:field="${activity.name}" required/></label>
    <label>Category: <input type="text" th:field="${activity.category}" required/></label>
    <label>Title: <input type="text" th:field="${activity.title}" /></label>
    <label>Creator: <input type="text" th:field="${activity.creator}" required/></label>
    <label>Abstract: <textarea th:field="${activity.abstractContent}" required></textarea></label>
    <label>Detailed Description: <textarea th:field="${activity.detailedDesc}" required></textarea></label>
    <label>Status: <input type="number" th:field="${activity.status}" required/></label>
    <label>Start Time: <input type="datetime-local" th:field="${activity.startTime}" required/></label>
    <label>End Time: <input type="datetime-local" th:field="${activity.endTime}" required/></label>

    <input type="submit" value="Add Activity" />
</form>

<a href="/activities/query-activities">Back to Activities</a>

</body>
</html>
